﻿/* Tabulka Ercolani-style */

.ercolani-table{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  background:#fff;

  border:1px solid rgba(0,0,0,.12);
  border-radius:0;
  box-shadow:0 10px 26px rgba(0,0,0,.06);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  color:rgba(0,0,0,.82);
}

/* ===== Integrovaný nadpis (1. řádek thead) – vycentrovaný, velmi jemné podbarvení ===== */
.ercolani-table thead .ercolani-table__title-row th{
  text-align:center;
  padding:12px 14px;
  font-weight:700;
  font-size:13.5px;
  color:rgba(0,0,0,.78);

  background:rgba(243,233,225,.35);
  border-bottom:1px solid rgba(0,0,0,.12);

  text-transform:none;
  letter-spacing:.01em;
}

.ercolani-table thead .ercolani-table__title-row th::before{
  content:none;
}

/* ===== Záhlaví sloupců ===== */
.ercolani-table thead tr:not(.ercolani-table__title-row) th{
  background:#f3e9e1;
  color:rgba(0,0,0,.68);
  font-weight:700;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;

  padding:12px 14px;
  border-bottom:1px solid rgba(0,0,0,.12);
}

/* ===== Buňky (zabrání přetékání do jiného sloupce) ===== */
.ercolani-table th,
.ercolani-table td{
  padding:12px 14px;
  font-size:13.5px;
  line-height:1.5;
  vertical-align:top;

  border-bottom:1px solid rgba(0,0,0,.10);

  /* ✅ pojistky proti přetékání */
  overflow:hidden;            /* nic nepřeleze do vedlejší buňky */
  overflow-wrap:anywhere;     /* zalomí i dlouhé řetězce */
  word-break:break-word;      /* fallback pro starší prohlížeče */
  hyphens:auto;               /* hezčí dělení slov, když to prohlížeč umí */
}

/* ===== Svislé dělící čáry (vynucené) ===== */
.ercolani-table th:first-child,
.ercolani-table td:first-child{
  border-right:1px solid rgba(0,0,0,.10);
}

.ercolani-table th:nth-child(2),
.ercolani-table td:nth-child(2){
  border-right:1px solid rgba(0,0,0,.10);
}

/* ===== Řádkové záhlaví ===== */
.ercolani-table tbody th[scope="row"]{
  font-weight:700;
  color:rgba(0,0,0,.78);
  white-space:nowrap; /* desktop OK */
}

/* Poslední řádek bez spodní linky */
.ercolani-table tbody tr:last-child th,
.ercolani-table tbody tr:last-child td{
  border-bottom:none;
}

/* Mobil */
@media (max-width:520px){
  .ercolani-table thead .ercolani-table__title-row th{
    padding:10px 12px;
  }

  .ercolani-table thead tr:not(.ercolani-table__title-row) th{
    padding:10px 12px;
    font-size:11px;           /* ✅ pomůže, aby se záhlaví vešlo */
  }

  .ercolani-table th,
  .ercolani-table td{
    padding:10px 12px;
    font-size:13px;
  }

  /* ✅ klíčové: první sloupec se může zalomit, jinak rozbije šířky */
  .ercolani-table tbody th[scope="row"]{
    white-space:normal;
  }
}
